import request from '@/utils/request'

 //API常量
 const APIS = {
  V1: "/v1"
}

export function createHouse(data) {
  return request({
    url: APIS.V1+`/system/house/saveHouse`,
    method: 'post',
    data
  })
}

export function createHouseDraft(data) {
  return request({
    url: APIS.V1+`/system/house/saveHouseDraft`,
    method: 'post',
    data
  })
}

export function updateHouse(data) {
  return request({
    url: APIS.V1+`/system/house/updateHouse`,
    method: 'post',
    data
  })
}

export function updateHouseRate(data) {
  return request({
    url: APIS.V1+`/system/house/updateHouseRate`,
    method: 'post',
    data
  })
}

export function findByProjectId(projectId) {
  return request({
    url: APIS.V1+`/system/house/findByProjectId`,
    method: 'get',
    params: projectId
  })
}

export function houseEvaluation(address) {
  return request({
    url: APIS.V1+`/system/house/evaluation`,
    method: 'get',
    params: address
  })
}

export function exportHouse(data) {
  return request({
    url:APIS.V1 + `/system/house/export`,
    method:'get',
    params:data
  })
}

export function deleteHouse(params) {
  return request({
    url:APIS.V1 + `/system/house/remove`,
    method:'delete',
    params: params
  })
}

